package com.hc.controller;

import com.hc.entity.User;
import com.hc.feign.MyFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("consumerFeign")
public class FeignConsumer {
    @Autowired
    private MyFeign myFeign;

    @GetMapping("getById")
    public User getById(Integer id) {
        return myFeign.getById(id);
    }

}
